<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="erp" uri="/erp-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/themes/base/jquery.ui.all.css">
<script src="<%=basePath%>script/jquery-ui-1.10.4/jquery-1.10.2.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.core.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.widget.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.button.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.position.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.tooltip.js"></script>
<!-- 用于代码高亮 -->
<script
	src="<%=basePath%>script/ueditor1_4_3-utf8-jsp/third-party/SyntaxHighlighter/shCore.js"></script>
<script src="<%=basePath%>script/script.js"></script>
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/demos/demos.css">
<!-- 用于代码高亮 -->
<link rel="stylesheet"
	href="<%=basePath%>script/ueditor1_4_3-utf8-jsp/third-party/SyntaxHighlighter/shCoreDefault.css">
<link rel="stylesheet" href="<%=basePath%>style/style.css">
<script>
	SyntaxHighlighter.all();

	$(function() {
		init_list_page();
	});

	function gotoPage(pageIndex) {
		window.location.href = "reply_list.action?topicId=" + ${topic.id}
				+ "&page.pageIndex=" + pageIndex;
	}
</script>

<style>
</style>

</head>
<body>
	<div class="center">
		<div class="list_container">
			<h1 class="catalogue">
				<s:a action="forum_list">版块列表</s:a>
				&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;
				<s:a action="topic_list?forum.id=%{#request.topic.forum.id}">${request.topic.forum.name}</s:a>
				&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;
				<s:a action="reply_list?topicId=%{#request.topic.id}">正文</s:a>
			</h1>
			<h1 class="topic_title">${topic.title}</h1>
			<p class="topic_content">${topic.content}</p>
			<div class="div_replyList">
				<s:iterator value="#request.replyList">
					<div class="div_reply">
						<span class="span_left_top"> <s:a
								action="user_show?id=%{author.id}"
								cssClass="a_watch_summary authorName" title="">${author.name}</s:a>
							<s:date name="%{postTime}" format="MM-dd HH:mm" />
						</span> <span class="span_right_top"> ${floor}楼 </span>
						<p class="reply_content">${content}&nbsp;&nbsp;</p>
						<span class="span_right_bottom"> <s:a
								action="reply_replyReply?topicId=%{#request.topic.id}&id=%{id}"
								cssClass="a_at">回复</s:a> <erp:link url="reply_report" value="举报"
								params="id" attr="class:a_report" /> <erp:link
								url="reply_delete" value="删帖" params="id" attr="class:a_delete" />
						</span>
						<div class="clear"></div>
					</div>
				</s:iterator>

				<!-- 分页信息 -->
				<br />
				<%@include file="/WEB-INF/jsp/public/pageController.jsp"%>
				<br /> <br />

			</div>
			<div id="reply_form_div">
				<s:form action="reply_add" method="post"
					enctype="multipart/form-data">

					<!-- 加载编辑器的容器 -->
					<script id="container" name="content" type="text/plain">
            			这里写你的初始化内容
        			</script>

					<s:hidden name="topicId" value="%{#request.topic.id}"></s:hidden>
					<%-- <s:textarea name="content" cols="35" rows="5"></s:textarea> --%>
				</s:form>
				<!-- 配置文件 -->
				<script type="text/javascript"
					src="<%=basePath%>script/ueditor1_4_3-utf8-jsp/ueditor.config.js"></script>
				<!-- 编辑器源码文件 -->
				<script type="text/javascript"
					src="<%=basePath%>script/ueditor1_4_3-utf8-jsp/ueditor.all.js"></script>
				<!-- 实例化编辑器 -->
				<script type="text/javascript">
					init_uEditor();
				</script>

				<s:a href="#" cssClass="a_add_reply">发表回复</s:a>
			</div>
		</div>
	</div>
	<!-- 信息概要显示框 -->
	<div id="summary_div" style="display: none;"></div>
</body>
</html>
